package com.lagou.sql;

import com.lagou.pojo.Configuration;
import com.lagou.sql.session.DefaultSqlSession;
import com.lagou.sql.session.SqlSession;

/**
 * @author Kirito
 * @description:
 * @date 2020/03/25
 */
public class DefaultSqlSessionFactory implements SqlSessionFactory {

    private Configuration configuration;

    public DefaultSqlSessionFactory(Configuration configuration) {
        this.configuration = configuration;
    }

    @Override
    public SqlSession openSqlSession() {
        return new DefaultSqlSession(configuration);
    }
}
